package com.yql.service.impl;

import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIConversion;
import com.yql.dao.MenuDao;
import com.yql.entity.Menu;
import com.yql.entity.User;
import com.yql.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class MenuServiceImpl implements MenuService {
    @Autowired
    MenuDao menuDao;
    @Override
    public List<Menu> getTree(User user) {
        if(null!=user){
            return menuDao.getTree(user.getMid());
        }else{
            return null;
        }

    }
}
